<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>猫购公告</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../css/base.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../css/message.css"/>
 
</head>
<body>
<script id="act-template" type="text/x-dot-template">
{{ for(var i=0; i< it.length; i++) { }}
	<article onclick="openHeader('messageDetail',{{=it[i].id}})">
			<div class='time'>
				
				<span>{{=it[i].time}}</span>
			</div>
			<dl class="border-img">
				<div>
					<dt>{{=it[i].title}}</dt>
					<dd class="border-bottom-img">{{=it[i].content}}</dd>
				</div>
				
				<div class='detail'>
					<span>查看详情</span>
					<i></i>
				</div>
			</dl>
		</article>
		{{}}}
</script>
	<div id='jqm-lotteryMessage'>
		
	</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
	<script type="text/javascript" src="../script/doT.min.js"></script>
	<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript">
	var uid = null;
	apiready = function(){
		uid = $api.getStorage('user').uid;
		api.ajax({
	        url:'http://wap.jqmao.cn/getSystemMessageList'
        },function(ret,err){
        	//coding...
        	if(ret){
				
				var content = $api.byId('jqm-lotteryMessage');
            	var tpl = $api.byId('act-template').text;
            	var tempFn = doT.template(tpl);
            	$api.html(content, tempFn(ret));
        	}else{
        		////alert(JSON.stringify(err));
        	}
        });
        
		
	};
</script>
</html>